Part 1: Ozone Concentrations

plot of chunk unnamed-chunk-1plot of chunk unnamed-chunk-1

Task 1

1. Calculate the trend surface for higher order polynomials. Do higher order polynomials capture large scale trends or are all the trends finer scale? What order polynomial would you choose to detrend your data?

plot of chunk unnamed-chunk-2 From these plots, I’d choose a 4 degree polynomial - it appears to capture enough fine scale trends. plot of chunk unnamed-chunk-3plot of chunk unnamed-chunk-3

## $par
## [1] 0.46111 0.38591 0.79994 0.04301
## 
## $value
## [1] -17.27
## 
## $counts
## function gradient 
##      367       NA 
## 
## $convergence
## [1] 0
## 
## $message
## NULL

plot of chunk unnamed-chunk-5

Task 2

2. EXTRA CREDIT: There are two other correlation functions built into the spatial package, the Gaussian covariance gaucov and the spherical covariance sphercov. Derive MLE for these two functions via numerical optimization. Turn in an AIC table for the models you fit and identify the best fitting model that you will use for Kriging

3. Explain the figure generated from the previous box of code. What is being plotted (axes, data, model)? How would you interpret this figure? How would you interpret the parameters of the best-fit model? What is the range? Note: you do not need to include the Gaussian and spherical lines if you did not fit them in the previous step.

Task 3

4. Include your kriged map of mean US ozone for 2008 in your lab report. Where in the country has the highest ozone levels?

plot of chunk unnamed-chunk-6

Generate a second map of mean US ozone but this time include contours based on the error matrix rather than the prediction matrix. Where are ozone levels most uncertain?

plot of chunk unnamed-chunk-7plot of chunk unnamed-chunk-7

.5 There are a few reasons that one might be skeptical of this initial exploratory map. Name at least two and describe ways the model could be improved (without collecting additional data).

Part 2:National Ozone Time Series

Task 4

7. Include the time series plot and briefly describe the features of the overall trend in ozone concentrations.

plot of chunk unnamed-chunk-8

Task 5

8. Does the detrended data meet the assumptions of second order stationarity? Why or why not?

plot of chunk unnamed-chunk-9plot of chunk unnamed-chunk-9plot of chunk unnamed-chunk-9

9. Does the first-difference time series meet the assumptions of second order stationarity? Why or why not?

plot of chunk unnamed-chunk-10plot of chunk unnamed-chunk-10

Task 7

12. Based on the diagnostics performed, what ARIMA model is likely to perform best? What orders should p, d, and q be? Why? Should you fit the model to xt or rx? 13. Fit the arima model you proposed using the function arima:

arima(xt,c(p,d,q))

Then propose alternative models that are similar to the one you fit (e.g. increase or decrease orders by 1). Based on AIC scores what model provides the best fit? Provide a table of models you tried and their AIC scores.

plot of chunk unnamed-chunk-12plot of chunk unnamed-chunk-12plot of chunk unnamed-chunk-12plot of chunk unnamed-chunk-12plot of chunk unnamed-chunk-12plot of chunk unnamed-chunk-12

you can do summary(surf0)